package cn.kgc.springcloud.handlers;

import cn.kgc.springcloud.commons.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 课工场
 * @date 2024/5/8
 * @description
 */
@RestControllerAdvice
@ResponseBody
public class GlobalExceptionHandler {


    @ExceptionHandler(Exception.class)
    public ResponseResult  allExceptionHandler(Exception e){

        return  ResponseResult.fail().message("服务器繁忙...");
    }
}
